package collectdemo13.Iterator;
import java.util.*;
public class IteratorDemo02
{

	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		List<String> list = new ArrayList<String>();
		list.add("hello");
		list.add("_");
		list.add("Mff");
		Iterator<String> iter = list.iterator();
		while(iter.hasNext())
		{
			String temp = iter.next();
			if("_".equals(temp))
			{
				iter.remove();
			}
			else
			{
				System.out.println(temp);
			}
		}
	}

}
